import React from 'react'
import ReactDOM from 'react-dom'
import { createBrowserHistory } from 'history'
import { Provider } from 'react-redux'
import { LocaleProvider } from 'antd'
import { ConnectedRouter } from 'connected-react-router'
import { HashRouter as Router } from 'react-router-dom'
import zhCN from 'antd/lib/locale-provider/zh_CN'
import configureStore from './store/configureStore'
import App from './view/App'
import * as serviceWorker from './serviceWorker'
import './index.css'

const history = createBrowserHistory()

ReactDOM.render(
  <Provider store={configureStore(history)}>
    <ConnectedRouter history={history}>
      <LocaleProvider locale={zhCN}>
        <Router>
          <App />
        </Router>
      </LocaleProvider>
    </ConnectedRouter>
  </Provider>,
  document.getElementById('root')
)

serviceWorker.unregister()
